//
//  main.m
//  scanf 函数
//
//  Created by dllo on 15/11/26.
//  Copyright © 2015年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>

int main(int argc, const char * argv[]) {
    int a = 0;
    int b = 0;
    char c = 0;
    printf("请输入整数a:\n");
    rewind(stdin);
    scanf("%d", &a);
    
    printf("请输入整数b:\n");
    rewind(stdin);
    scanf("%d", &b);
    printf("请输入字符c:\nc");
    rewind(stdin);
    scanf(" %c", &c);
    printf("a:%d,b:%d,c:%c\n", c, a, b);
    /*堆内存释放*/
    for (i = 0; i < 3; i++) {
        free(words[i]);
    }
    
    return 0;
}
